$('.column_edit').on('click', function () {
    var column = $(this).parent().siblings().each(function () {
        // console.log($(this).attr('class'))
    });
    // console.log(column)
})

$('.column_delete').on('click', function () {
    var field_name = $(this).attr('data-id');
    var confirm_layer = layer.confirm('确定删除字段：'+field_name+'？（删除后无法恢复，请谨慎操作！）', {
        title: '删除字段确认',
        btn: ['我已确定','再想想'],
        icon: 7,
    }, function(){
        var postData = {
            db_name: $('#db_name_input').val(),
            table_name: $('#table_name_input').val(),
            field_name: field_name,
            _token: $('meta[name="csrf-token"]').attr('content'),
        }
        var res = sendAjaxRequest('POST', '/database/dropField', postData, false);
        if (res.status == 0) {
            layer.msg('删除成功');
            reloadPage();
        } else {
            layer.close(confirm_layer);
            $('.error-tip').html('<font color="red">'+res.msg+'</font>');
            // layer.msg(res.msg);
        }
    }, function(){
        // 取消操作
    });
})